<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
	<head>
		<title>ISERN-2.0</title>
		<link href="styles/all.css" rel="stylesheet" type="text/css" media="screen" />
	
		<script type="text/javascript" src="ajax/prototype.js"></script>
		<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
		<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />	
	</head>
		<body>
		<div class="container">
			<div class="holder_top"></div>
			<div class="navigation">
				<table class="navTable">
				<tr>
					<td class="title">
						Collaboration
					</td>
					<td class="title">
						Organization
					</td>
					<td class="title">
						Researcher
					</td>
					<td class="title">
						More
					</td>
				</tr>
				<tr>
					<td>
					<stripes:form id="AddCollaborationForm" action="/Collaboration.action">
						<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="New" name="collaborationForm"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="AddOrganizationForm" action="/Organization.action">
						<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="New" name="organizationForm"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="AddResearcherForm" action="/Researcher.action">
						<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="New" name="researcherForm"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="ImportData" action="/MyIsern.action">
						<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Import Data" name="importData"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="SanityReport" action="/MyIsern.action">
						<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Sanity Check" name="sanityCheckResultsList"/>
					</stripes:form>
					</td>
				</tr>
				<tr>
					<td>
					<stripes:form id="EditCollaborationForm" action="/Collaboration.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Edit\Delete" name="editCollaborationForm"/>
				 	</stripes:form>
					</td>
					<td>
					<stripes:form id="EditOrganizationForm" action="/Organization.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Edit\Delete" name="editOrganizationForm"/>
					</stripes:form>
					</td>
					
					<td>
					<stripes:form id="EditResearcherForm" action="/Researcher.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Edit\Delete" name="editResearcherForm"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="ExportData" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Export Data" name="exportData"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="LogoutForm" action="/Logout.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Logout" name="logout"/>
					</stripes:form>
					</td>
				</tr>
				<tr>
					<td>
					<stripes:form id="DisplayCollaborations" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Display" name="displayCollaborations"/>
					</stripes:form>
					</td>
					
					<td>
					<stripes:form id="DisplayOrganizations" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Display" name="displayOrganizations"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="DisplayResearchers" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Display" name="displayResearchers"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="DrawNetwork" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:submit class="button" value="Draw Network" name="drawNetwork"/>
					</stripes:form>
					</td>
					<td>
					<stripes:form id="Home" action="/MyIsern.action">
							<img src="imagesBlue/li.gif" class="ligif"/><img src="imagesBlue/arrow.gif" class="arrowgif" style="display: none;"/>&nbsp;&nbsp;<stripes:link href="http://localhost:8080/myisern-pink-2.0/homepage.jsp" event="Home" >Home</stripes:link>
					</stripes:form>
					</td>
				</tr>
			</table>
		</div>
		<div class="holder_bottom"></div>
			<div class="holder_top"></div>
			<div class="holder">
			
			<br style="clear: left" />
			
					<!-- start content -->
	            	<c:if test='${actionBean.listType == "Researchers"}'>
					<h1 class="title" align="center">Display ${actionBean.listType}</h1>
						<c:forEach var="element" items="${actionBean.researchers}">
							<div id="CollapsiblePanel1" class="CollapsiblePanel">
								<div class="CollapsiblePanelTab" tabindex="0">
								<table>
								<tr>
								<td width="90px">
								<img src="${element.pictureLink}" width="55px" height="55px" alt="Face Picture"/>
								</td>
								<td>
								${element.name}
								</td>
								</tr>
								</table>
								</div>
								<div class="CollapsiblePanelContent">
									<table cellpadding="5" border="1">
										<tbody>
											<tr align="left">
												<td><strong>Organization</strong></td>
												<td>
													<table><tbody><tr><td>${element.organization}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Email</strong></td>
												<td>
													<table><tbody><tr><td>${element.email}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Picture-Link</strong></td>
												<td>
													<table><tbody><tr><td><a href="${element.pictureLink}">${element.pictureLink}</a></td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Bio-Statement</strong></td>
												<td>
													<table><tbody><tr><td>${element.bioStatement}</td></tr></tbody></table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<script type="text/javascript">
								var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
							</script> 
						</c:forEach>
	                </c:if>
					<c:if test='${actionBean.listType == "Organizations"}'>
					<h1 class="title" align="center">Display ${actionBean.listType}</h1>
						<c:forEach var="element" items="${actionBean.organizations}">
							<div id="CollapsiblePanel1" class="CollapsiblePanel">
								<div class="CollapsiblePanelTab" tabindex="0">
								<table>
								<tr>
								<td width=200px">
								${element.name}&nbsp;&nbsp;&nbsp;
								</td>
								<td>
								<font size="0.8em">
								${element.researchKeywords.researchKeyword}
								</font>
								</td>
								</tr>
								</table>
								</div>
								<div class="CollapsiblePanelContent">
									<table cellpadding="5" border="1">
										<tbody>
											<tr align="left">
												<td><strong>Type</strong></td>
												<td>
													<table><tbody><tr><td>${element.type}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Contact</strong></td>
												<td>
													<table><tbody><tr><td>${element.contact}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Affiliated-Researchers</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element1" items="${element.affiliatedResearchers.affiliatedResearcher}">
																<tr align="left">	
																	<td>${element1}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Country</strong></td>
												<td>
													<table><tbody><tr><td>${element.country}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Research-Keywords</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element2" items="${element.researchKeywords.researchKeyword}">
																<tr align="left">
																	<td>${element2}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Research-Description</strong></td>
												<td>
													<table><tbody><tr><td>${element.researchDescription}</td></tr></tbody></table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Home Page</strong></td>
												<td>
													<table><tbody><tr><td>${element.homePage}</td></tr></tbody></table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<script type="text/javascript">
									var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
							</script> 
						</c:forEach>
	                </c:if>
					<c:if test='${actionBean.listType == "Collaborations"}'>
					<h1 class="title" align="center">Display ${actionBean.listType}</h1>
	                    <c:forEach var="element" items="${actionBean.collaborations}">
							<div id="CollapsiblePanel1" class="CollapsiblePanel">
								<div class="CollapsiblePanelTab" tabindex="0">
								<table>
								<tr>
								<td width="200px">
								${element.name} &nbsp;&nbsp;&nbsp;
								</td>
								<td>
								<font size="0.8em">
								${element.description}
								</font>
								</tr>
								</table>
								</div>
								<div class="CollapsiblePanelContent">
									<table cellpadding="5" border="1">
										<tbody>
											<tr align="left">
												<td><strong>Collaborating-Organizations</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element1" items="${element.collaboratingOrganizations.collaboratingOrganization}">
																<tr align="left">
																	<td>${element1}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Collaboration-Types</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element2" items="${element.collaborationTypes.collaborationType}">
																<tr align="left">
																	<td>${element2}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Years</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element3" items="${element.years.year}">
																<tr align="left">
																	<td>${element3}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Outcome-Types</strong></td>
												<td>
													<table>
														<tbody>
															<c:forEach var="element4" items="${element.outcomeTypes.outcomeType}">
																<tr align="left">
																	<td>${element4}</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</td>
											</tr>
											<tr align="left">
												<td><strong>Description</strong></td>
												<td>
													<table><tbody><tr><td>${element.description}</td></tr></tbody></table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<script type="text/javascript">
								var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
							</script> 
					    </c:forEach>
	                </c:if>
	    	<!-- end content -->
	    	<div style="clear: both;">&nbsp;</div>
			</div>
			<div class="holder_bottom"></div>
			<div class="holder_top"></div>
			<div class="footerholder">
				<div class="footer">	
    			<p>&copy;2007 All Rights Reserved.</p>
				</div>		
			</div>
			<div class="holder_bottom"></div>
		</div>
	</body>
</html>
	